import axios from 'axios'
import Vue from 'vue'

let instance = axios.create({
    baseURL:'http://127.0.0.1:3333',
    headers:{
        token:'abcd'
    }
})
console.log(instance)

// 拦截器
instance.interceptors.request.use(function(config){
    return config
})
instance.interceptors.response.use(function(response){
    return response.data
})
Vue.prototype.$http = instance
// 导出
export default instance